import React, { Component } from 'react';
import { NavLink } from 'react-router-dom'
class Index extends Component {
  render() {
    const {routes} = this.props
    return (
      <div style={{
        display: 'flex',
        justifyContent: 'space-around',
        alignItems: 'center',
        height: '6vh',
        background: 'skyblue'
      }}>
        {
          routes.length > 0 && routes.map((v, i) => {
            return (
              v.path && <NavLink to={ v.path } key={i}>{v.name}</NavLink>
            )
          })
        }
      </div>
    );
  }
}

export default Index;
